def checkInput(username):
    """验证用户名"""
    conditions = [
        username is not None,  # 不能为None
        len(username) >= 3,  # 长度至少3位
        len(username) <= 20,  # 长度最多20位
        username.isalnum(),  # 只能包含字母和数字
        not username.isdigit()  # 不能全是数字
    ]
    return all(conditions)

username = 'h1234'
isValidUsername = checkInput(username)
print(isValidUsername)